package com.yh.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.yh.service.HelloService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ConsumerController {
    @Reference // 引用服务
    HelloService helloService;


    @GetMapping("/hello")
    public String hello() {
        return helloService.sayHello("world");
    }

}
